﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using InvestmentIntelligence.DbModel.Models;

namespace InvestmentIntelligence.Data.Repository
{
    public interface IInvestmentRepositoryEF
    {
        /// <summary>
        /// Get Position Series By Book, Securities and in range between start and end dates
        /// </summary>
        /// <param name="fundBookEntityId">fund book id</param>                
        /// <returns>Positions series (Exposure divided by Close Capital) by fund and securities and dates</returns>
        List<T> GetSecuritySeriesByBook<T>(Func<IQueryable<InvestmentSecuritySerie>, IEnumerable<T>> f, int fundBookEntityId);

        List<Investment> GetList(Expression<Func<Investment, bool>> queryExpression);

        Expression<Func<Investment, bool>> GetQueryExpression(int fundBookId);

        List<InvestmentSecuritySerie> GetSecuritySeries(Expression<Func<Investment, bool>> queryExpression, List<int> securityIds);
    }
}
